export const CHANGE_LANGUAGE = "change_language"

interface ChangeLanguageAction {
  type: typeof CHANGE_LANGUAGE;
  payload: 'en' | 'zh'
}

export type languageActionTypes = ChangeLanguageAction

export const changeLanguageActionCreator = (languageCode: 'en' | 'zh'):ChangeLanguageAction => {
  return {
    type: CHANGE_LANGUAGE,
    payload: languageCode
  }
}
